﻿using System.Windows.Controls;
using System.Windows;
using System;

namespace Oliver.Controls
{
    public partial class BaseContainer : Panel
    {
        public TimeSpan FrameRate
        {
            get 
            {
                return GetFrameRate();
            }
        }

        public static int MillisecondPerFrame
        {
            get 
            {
                return Application.Current.Host.Settings.MaxFrameRate / 1000;
            }
            
        }

        public static int FramesPerSecond
        {
            get { return 1000 / Application.Current.Host.Settings.MaxFrameRate; }
        }

        public static TimeSpan GetFrameRate()
        {
            int ms = FramesPerSecond;
            return TimeSpan.FromMilliseconds(ms); 
        }
    }
}
